<template>
  <h1>这是InjectDemo组件</h1>
  <h2>InjectDemo 监听消息：{{ message }}</h2>

  <Level2InjectDemo/>
</template>


<script setup>

import {inject} from "vue";
import Level2InjectDemo from "./Level2InjectDemo.vue";

const message = inject('msgKey');
</script>


<style scoped>

</style>